// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import './lib/hotcss/hotcss.js';
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import store from './store'
import axios from 'axios'
import helper from "./lib/helper.js"
import echarts from 'echarts'

Vue.prototype.$echarts = echarts 
// 引入mint ui的样式
// import 'mint-ui/lib/style.css';
Vue.config.productionTip = false
Vue.use(MintUI,axios)
// Vue.use(VeeValidate); // good to go.

/* eslint-disable no-new */
router.beforeEach((to,from,next)=>{
	if(to.path!="/"){//获取数据类型
		if(helper.getTypes(store.getters.getLoginUser)==="Object"){
			next()
		}else{
			next("/")
		}
	}else{
		next()
	}
})

new Vue({
  el: '#app',
  router,
	store,
  components: { App },
  template: '<App/>'
})
